<script setup lang="ts">
import { onMounted, ref } from 'vue';
import ChildComp from './components/ChildComp.vue'

const childRef = ref<InstanceType<typeof ChildComp>>()

onMounted(() => {
  // console.log(childRef.value?.car);
  // childRef.value?.play()
})

</script>

<template>
  <div class="father">
    父组件
    <ChildComp ref="childRef" />
  </div>
</template>

<style scoped>
.father {
  width: 800px;
  height: 500px;
  border: 10px solid #000;
}
</style>
